<template>
  <div class="home-swiper">
    <van-swipe :autoplay="3000">
      <van-swipe-item v-for="(item,index) in banners" :key="index">
        <img v-lazy="item" src="item.imageUrl"/>
      </van-swipe-item>
    </van-swipe>
  </div>
</template>
<script>
export default {
  created(){
    this.getData()
  },
  methods:{
    getData(){
      this.$request('get','/banner').then((res)=>{
        console.log(res);
        this.banners = res.banners;
      });
    },
  },
};
</script>
<style scoped>
 
</style>>